const path = require('path');
const bodyParser = require('body-parser');
const express = require('express');

const app = express();

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, './project')));
// app.use(express.static(path.join(__dirname, './project1')));

// 'xxxx/xxx/xxx/zhangsan/13'
// 动态参数
app.post('/user', (req, res) => {
    console.log(req.body);
    res.send('<h1>hi</h1>');
});

app.listen(80, () => {
    console.log('heihei');
});
